package smoothcraft.Util.home;

import java.io.File;
import java.util.Set;

import org.bukkit.Location;
import org.bukkit.configuration.file.YamlConfiguration;

public class API {
	private File file;
	private YamlConfiguration yml;
	private Set<String> set;
	public String getPlayerHome(String player) {
		file = new File("plugins/smoothcraft/user/", player + ".yml");
		yml = YamlConfiguration.loadConfiguration(file);
		set = yml.getDefaults().getKeys(false);
		System.out.println(set.toString());
		return yml.getString("home");
	}
	public void setPlayerHome(String player,String name,Location loc) {
		file = new File("plugins/smoothcraft/user/", player + ".yml");
		yml = YamlConfiguration.loadConfiguration(file);
		yml.set("home",name);
	}
}
